<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import = "java.io.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>OOCIS</title>
<style type="text/css">
<!--
body {
	background-color: #666666;
}
-->
</style></head>

<body>
<%
OutputStream o = response.getOutputStream();

byte b[] = new byte[500];
File fileLoad = new File("D:/2001","book.zip");

response.setHeader("Constent-disposition", "attachment; filename = " + "book.zip");

response.setContentType("application/x-tar");

long fileLength = fileLoad.length();

String length = String.valueOf(fileLength);

response.setHeader("Content_Length", length);

FileInputStream in = new FileInputStream(fileLoad);

int n = 0;

while( (n = in.read(b)) != -1)
{
o.write(b,0,n);
}
%>
</body>
</html>
